<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<div class="table-scrollable">
	<table class="table table-striped table-hover table-success">
		<thead>
			<tr>
				<th>#</th>
				<th>流程编号</th>
				<th>流程名称</th>
				<th>流程key</th>
				<th>版本号</th>
				<th>查看流程图</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${list }" var="item" varStatus="vs">
			<tr>
				<td>${vs.count}</td>
				<td>${item.id}</td>
				<td>${item.name}</td>
				<td>${item.key }</td>
				<td>${item.version}</td>
				<td>
					<a onclick="showPng('${item.id}');"><i class="glyphicon glyphicon-picture"></i></a>
				</td>
				<td>
					<a href="javascript:;" class="btn btn-sm red" onclick="del('/processDefinition/delete/${item.id}')">
						<i class="fa fa-trash"></i>删除
					</a>
				</td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
</div>

<div class="modal fade" tabindex="-1" role="dialog" id="processDefinition_modal">
	  <div class="modal-dialog" role="document">
	  	 <img alt="" src="" id="png">
	  </div>
</div>
<script type="text/javascript">
	
	function showPng(id) {
		
		$("#png").attr("src", "/processDefinition/showPng/"+id);
		$("#processDefinition_modal").modal(function(){
			backdrop:"static"
		});
	}

</script>
